import request from '@/utils/request'

// 查询参与者基本信息列表
export function listParticipant(query) {
  return request({
    url: '/human/participant/list',
    method: 'get',
    params: query
  })
}

// 查询参与者基本信息详细
export function getParticipant(participantId) {
  return request({
    url: '/human/participant/' + participantId,
    method: 'get'
  })
}

// 新增参与者基本信息
export function addParticipant(data) {
  return request({
    url: '/human/participant',
    method: 'post',
    data: data
  })
}

// 修改参与者基本信息
export function updateParticipant(data) {
  return request({
    url: '/human/participant',
    method: 'put',
    data: data
  })
}

// 删除参与者基本信息
export function delParticipant(participantId) {
  return request({
    url: '/human/participant/' + participantId,
    method: 'delete'
  })
}
// 查询所有参与者
export function getParticipants() {
  return request({
    url: '/human/participant/getParticipants',
    method: 'get'
  })
}
// 用户头像上传
export function uploadAvatar(data) {
  return request({
    url: '/human/participant/avatar',
    method: 'post',
    headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
    data: data
  })
}